﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using DataLayer.Class;

namespace WinProgProject2
{
    public partial class MusteriBilgisiGoster : UserControl
    {
        Musteri musteri;

        public Musteri Musteri
        {
            get { return musteri; }
            set { musteri = value; }
        }

        public MusteriBilgisiGoster()
        {
            InitializeComponent();
        }
        public void MusteriBilgileriniYerlestir()
        {
            if (musteri.Ad == null || musteri == null)
            {
                lblID.Text = "";
                lblAd.Text = "";
                lblKayitTarihi.Text = "";
                lblSoyad.Text = "";
                lblOncelik.Text = "";
                lblTelefon.Text = "";
                lblPuan.Text = "";
            }
            else
            {
                lblID.Text = musteri.MusteriID.ToString();
                lblAd.Text = musteri.Ad;
                lblKayitTarihi.Text = musteri.KayitTarihi.ToShortDateString();
                lblSoyad.Text = musteri.Soyad;
                lblOncelik.Text = musteri.Oncelik.Ad;
                lblTelefon.Text = musteri.TelefonNo;
                lblPuan.Text = musteri.Puan.ToString();
            
            }
        }

        
    }
}
